package cn.stylefeng.guns.modular.gridsystem.config;

import cn.stylefeng.guns.modular.gridsystem.netty.tcp.TcpServer;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ssy
 * @date 2023/3/27 10:52
 */
@ConfigurationProperties("tcp.server")
@Configuration
@Data
public class TcpServerConfig {
    private boolean enable;
    private int port;

    @Bean
    public TcpServer tcpServer() {
        return new TcpServer();
    }
}

